package cn.huiyunche.base.service.vo;

import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Pattern;

/**
 * 添加tms用户视图
 *
 * @author hdy [Tuffy]
 */
public class TmsDriverVo {

    @NotBlank(message = "姓名不能为空")
    @Pattern(regexp = "^[\\u4E00-\\u9FFF]{2,4}$", message = "姓名必须是2～4个汉字")
    private String name;

    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "^(1\\d{10})$", message = "手机号格式错误")
    private String phone;

    @NotBlank(message = "出生日期不能为空")
    private String birthday;

    @NotBlank(message = "司机编号不能为空")
    private String licenseCode;

    @NotBlank(message = "司机身份证不能为空")
    @Pattern(regexp = "^[1-9]\\d{7}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}$|^[1-9]\\d{5}[1-9]\\d{3}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}([0-9]|X)$", message = "身份证号格式错误")
    private String idCard;

    @NotBlank(message = "地址不能为空")
    private String address;

    @NotBlank(message = "驾照类型不能为空")
    private String license;

    @NotBlank(message = "证件日期不能为空")
    private String licenseDate;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public String getLicenseCode() {
        return licenseCode;
    }

    public void setLicenseCode(String licenseCode) {
        this.licenseCode = licenseCode;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getLicense() {
        return license;
    }

    public void setLicense(String license) {
        this.license = license;
    }

    public String getLicenseDate() {
        return licenseDate;
    }

    public void setLicenseDate(String licenseDate) {
        this.licenseDate = licenseDate;
    }

}
